<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="libman.css">
<TITLE>
Cutpool Constraints
</TITLE>
</HEAD>
<BODY >
<A HREF="libman056.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman052.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman058.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc129">9.5</A>&nbsp;&nbsp;Cutpool Constraints</H2><UL>
<LI><A HREF="libman057.html#toc74">Solving a Problem with Cutpool Constraints</A>
<LI><A HREF="libman057.html#toc75">Predicate-specific Support</A>
</UL>

<A NAME="@default329"></A>
<A NAME="@default330"></A>
In eplex, constraints added to a problem are removed on
backtracking. However, it is sometimes possible to discover constraints
that are valid for the whole problem, which the user wish to apply even
after backtracking &ndash; such constraints are referred to as `global cuts'. <BR>
<BR>
In addition, the user may want to remove some constraints from
the problem being solved, because they do not help to constrain the
problem, but they slow down the solving of the problem. <BR>
<BR>
To support this, eplex allow constraints to be added to a
<I>cutpool</I> associated with a problem, instead of directly to the
problem. The main differences from the normal problem constraints are:
<UL CLASS="itemize"><LI CLASS="li-itemize">
they are <I>not</I> removed on backtracking. Once
added to a cutpool, a constraint exists until the problem itself is
destroyed. 
<LI CLASS="li-itemize">they are handled differently during solving, and the user has more
control on how the external solver takes the constraints into account.
</UL>
<A NAME="toc74"></A>
<H3 CLASS="subsection"><A NAME="htoc130">9.5.1</A>&nbsp;&nbsp;Solving a Problem with Cutpool Constraints</H3>
Logically, cutpool constraints are always valid for the problem, and so
should be considered when the problem is solved. Unlike normal
constraints, cutpool constraints are not necessarily added to the
solver's problem matrix, and if they are added, they are added only for the
solving, and removed from the problem matrix after the solving. <BR>
<BR>
When the external solver 
solves the problem, eplex ensures that the cutpool constraints are
consistent with the problem, i.e. none of the constraints are
violated. The cutpool constraints can either be added to the problem matrix
immediately, or they can be checked for violation after the solver solves
the problem. Any
violated constraints are then added to the problem, and the problem
resolved. This is repeated until either a fix-point is reached, where no
constraints are violated, or if the external solver is unable to solve the
problem. <BR>
<BR>
If the external solver does not produce a solution, then:
<UL CLASS="itemize"><LI CLASS="li-itemize">
if the problem is unbounded, any outstanding cutpool constraints are
added to the problem matrix without checking for violation, and the
external solver is invoked for one more time. This is because the extra
constraints may make the problem bounded. 
<LI CLASS="li-itemize">if the problem is infeasible, then failure occurs as normal (with the
default infeasible handler behaviour). 
</UL>
This multiple invocation of the solver occurs within an eplex's call to the
external solver to solve a problem, and so the process should be
transparent to the user, except that the setting of the timeout applies to
each solver invocation, rather than to the whole solving process.<BR>
<BR>
The user can specify how the cutpool constraints are treated: they can be
either added to the problem matrix before invoking the solver, or only
added if violated. In addition, cutpool constraints
can be made inactive, in which case they are not considered for adding to
the problem matrix at all (and are not checked for violations). This is
provided for efficiency reason &ndash; if the user knows for certain
constraints would not be violated by the solution, they can be made
inactive. It is the user's responsibility to ensure the correctness in this
case. <BR>
<BR>
Unlike normal problem constraints, cutpool constraints cannot add new
variables to the problem, i.e. the constraint must only involve problem
variables that are present in the problem during solver set up. This is
because cutpool constraints are globally valid, and so cannot involve
variables that may not exist after backtracking. Variables can be added to
a problem before solver set up by posting constraints involving them,
including <A HREF="../bips/lib/eplex/reals-1.html"><B>reals/1</B></A><A NAME="@default331"></A>, which simply
declares variables as problem variables. <BR>
<BR>
Additionally, each cutpool constraint belongs to a named
group, specified when the constraint is added. This allows the user to
classify the cutpool constraints into different groups, and then
manipulate a groups of constraints as a whole, <I>e.g.</I> making them all
inactive. A default group is predefined, to which cutpool constraints
belongs unless specified otherwise. To add cutpool constraints to other
groups, the group name must first be created with the
<TT>cutpool_group</TT> option of
<A HREF="../bips/lib/eplex/lp_get-3.html"><B>lp_get/3</B></A><A NAME="@default332"></A>.<BR>
<BR>
<A NAME="toc75"></A>
<H3 CLASS="subsection"><A NAME="htoc131">9.5.2</A>&nbsp;&nbsp;Predicate-specific Support</H3>
Constraints are added to the cutpool using:<BR>
<BR>

<H4 CLASS="subsubsection"><A HREF="../bips/lib/eplex/lp_add_cutpool_constraints-4.html"><B>lp_add_cutpool_constraints/4</B></A><A NAME="@default333"></A></H4>
 Add the constraints to the cut-pool associated with the
 problem specified by the handle. By default, the constraints belong to
 the default group, and are active and have the `add initially' status
 set. These can be over-ridden by the Options argument. The predicate
 returns a list of indices for these constraints in Idxs.<BR>
<BR>
Information on cutpool constraints can be obtained using the 
<TT>cutpool_info</TT>
option of <A HREF="../bips/lib/eplex/lp_get-3.html"><B>lp_get/3</B></A><A NAME="@default334"></A>. The status of
a cutpool constraint, such as its active status, can be set using the 
<TT>cutpool_option</TT> option of
<A HREF="../bips/lib/eplex/lp_set-3.html"><B>lp_set/3</B></A><A NAME="@default335"></A> &ndash; the change is
non-logical, i.e. it is not undone on backtracking.<BR>
<BR>
Using lp_get/3 and lp_set/3, the user can program their own algorithms to
control how the cutpool constraints are treated when the problem is solved.
For example, the user may want to make a whole group of constraints
inactive because they seem to slow the solver down but do not produce
better solutions. In this case, the user can use lp_get/3 to obtain all the
current constraints in the group, and then use lp_set/3 to set these
constraints to inactive.<BR>
<BR>
As cutpool constraints are not added directly to the problem matrix, this
affects the library predicates that deals with the problem state:
<UL CLASS="itemize"><LI CLASS="li-itemize">
row-wise solution states like dual and slack values include only the
cutpool constraints that are actually added to the problem. These are added
after the normal constraints, and their order in the matrix can be obtained
using the <TT>cutpool_info(last_added, index)</TT> option of
<A HREF="../bips/lib/eplex/lp_get-3.html"><B>lp_get/3</B></A><A NAME="@default336"></A>. 
<LI CLASS="li-itemize">the <TT>constraints</TT> and <TT>constraints_norm</TT> options of
<A HREF="../bips/lib/eplex/lp_get-3.html"><B>lp_get/3</B></A><A NAME="@default337"></A> returns only the normal
constraints. Other options that returns information about the problem
(e.g. <TT>num_rows</TT>) also do not include the cutpool constraints. 
<LI CLASS="li-itemize"><A HREF="../bips/lib/eplex/eplex_write-2.html"><B>eplex_write/2</B></A><A NAME="@default338"></A> and 
<A HREF="../bips/lib/eplex/lp_write-3.html"><B>lp_write/3</B></A><A NAME="@default339"></A> will dump all 
the active cutpool constraints with the problem. This may be different from
the actual problem solved by the external solver because not all active
cutpool constraints need be added to the problem, and the order of these
constraints could be different. To dump the exact problem solved by the
external solver, use the <TT>write_before_solve</TT> option of the solver
instead. 
</UL>
<HR>
<A HREF="libman056.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman052.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman058.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
